package com.ruoyi.common.core.utils.pwd;

import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.digest.MD5;

/**
 * <p>
 * 作用：密码加密机
 * </p>
 *
 * @author Zane
 * @since 2025-10-05 22:43
 */
public class PwdUtil {
  private final static String SECRET = MD5.create().digestHex("abcdefghijklmnopqrstuvwxzy");
  private final static String PREFIX = "PWD";
  private final static String SUFFIX = "PWD";
  public static String encode(String password) {
    return MD5.create().digestHex(StrUtil.format("{}&{}&{}&{}", PREFIX ,SECRET, password, SUFFIX));
  }

  public static void main(String[] args) {
    System.out.println(encode("123456"));
  }
}
